home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Internet Surfer: Getting Started
/
Internet Surfer - Getting Started (Wayzata Technology)(7231)(1995).bin
/
pc
/
textfile
/
mac_faqs
/
perl_faq
/
diff
next >
Wrap
Internet Message Format
|
1995-01-30
|
11KB
Xref: bloom-picayune.mit.edu comp.lang.perl:14080 news.answers:4269
Newsgroups: comp.lang.perl,news.answers
Path: bloom-picayune.mit.edu!enterpoop.mit.edu!usc!wupost!news.utdallas.edu!convex!tchrist
From: Tom Christiansen <tchrist@convex.COM>
Subject: comp.lang.perl FAQ diffs
Originator: tchrist@pixel.convex.com
Sender: usenet@news.eng.convex.com (news access account)
Message-ID: <1992Nov30.131631.11693@news.eng.convex.com>
Approved: news-answers-request@MIT.Edu
Date: Mon, 30 Nov 1992 13:16:31 GMT
Expires: Mon, 4 Jan 1993 12:00:00 GMT
Reply-To: tchrist@convex.COM (Tom Christiansen)
References: <1992Nov30.124619.8579@news.eng.convex.com>
Nntp-Posting-Host: pixel.convex.com
Organization: Convex Computer Corporation, Colorado Springs, CO
Followup-To: comp.lang.perl
X-Disclaimer: This message was written by a user at CONVEX Computer
Corp. The opinions expressed are those of the user and
not necessarily those of CONVEX.
Lines: 292
Here are the diffs for this month's FAQ. We have three new
questions, plus some typos fixes and address corrections.
--tom
29c29
< Special thanks to Larry Wall for initially reviewing this list for
---
> Special thanks to Larry Wall for periodically reviewing this list for
32d31
<
60a60
> 1.29) Is there a pretty-printer for Perl?
95a96,97
> 2.35) How can I set up a footer format to be used with write()?
> 2.36) Why does my Perl program keep growing in size?
98d99
<
184c185
< archive.cs.ruu.nl 131.211.80.5 (Europe)
---
> ftp.cs.ruu.nl 131.211.80.17 (Europe)
290c291
< You should definitely read the USENET comp.lang.perl newsgrouor
---
> You should definitely read the USENET comp.lang.perl newsgroup or
318,321c319
< North America and 1-707-829-0515. Autographed copies are available
< from TECHbooks by calling 1-503-646-8257 or mailing info@techbook.com.
< Cost is ~30$US for the regular version, 40$US for the autographed one.
< The book's ISBN is 0-937175-64-1.
---
> North America and 1-707-829-0515. The book's ISBN is 0-937175-64-1.
322a321,324
> Autographed copies are *NO LONGER* available from TECHbooks --
> you'll have to nab the authors in person if you want one. Larry
> routinely carries around a camel stamp for just such an occasion.
>
333c335,336
< Volume 2 Number 4.
---
> Volume 2 Number 4. The newest (Dec 92) Computer Language magazine
> is also alleged to contain a cover article on Perl.
335c338
< The USENIX LISA (Large Installations Systems Adminstration) Conference
---
> The USENIX LISA (Large Installations Systems Administration) Conference
339c342
< for futher information.
---
> for further information.
345c348
< tut.cis.ohio-state.edu in the pub/perl/scripts/ subdirectory.
---
> archive.cis.ohio-state.edu in the pub/perl/scripts/ subdirectory.
365c368
< archive.cs.ruu.nl [131.211.80.5], file /pub/DOC/perlref-4.035.tar.Z.
---
> ftp.cs.ruu.nl [131.211.80.17], file /pub/DOC/perlref-4.035.tar.Z.
423,425c426,428
< the host betwixt.cs.caltech.edu (131.215.128.4) in the directory
< /pub/comp.lang.perl. They are also to uunet in
< /languages/perl/comp.lang.perl . It contains these things:
---
> the host ftp.cs.caltech.edu (131.215.128.204) in the directory
> /pub/comp.lang.perl. The file is comp.lang.perl.tar.Z; this file
> was last modified on February 15, 1992, and is 8.9 megabytes long.
427,430d429
< comp.lang.perl.tar.Z -- the 5M tarchive in MH/news format
< archives/ -- the unpacked 5M tarchive
< unviewed/ -- new comp.lang.perl messages
<
458c457
< Liam Quin's excellent lqtext system, available from ftp.toronto.edu
---
> Liam Quin's excellent lqtext system, available from ftp.cs.toronto.edu
462c461,462
< these days, but I haven't used them.
---
> these days, but I haven't used them. Any information on these would
> be appreciated.
480,481c480,481
< ftp to rascal.ics.utexas.edu from the file
< ~ftp/mac/programming/Perl_402_MPW_CPT_bin .
---
> ftp to wuarchive.wustl.edu [128.252.135.4] from the file
> /mirrors2/rascal.ics.utexas.edu/programming/Perl_402_MPW_CPT_bin .
482a483,485
> You can also get it from Host gatekeeper.dec.com [16.1.0.2]
> in /.9/plan/perl/macperl/Perl_402_MPW_CPT_bin .
>
484c487
< be considerate of RASCAL's users during CDT working hours.
---
> be considerate of the archive sites' users during CDT working hours.
496a500,517
> Here's more, from Timothy Murphy <tim@maths.tcd.ie >
>
>
> I ported perl to the Mac, using Think C, a while ago. I've
> used it quite a lot since without problems.
>
> It is available from ftp.maths.tcd.ie in pub/Mac/perl.hqx .
> The source (as diffs from the standard source) is in the
> subdirectory pub/Mac/perl-4.035 .
>
> A Mac version of patch is also available in pub/Mac/patch.hqx
> with source in pub/Mac/patch-2.0 . Various other Mac ports of
> GNU programs can be found in the same place.
>
> They all use a small "ThinkCPosix" library containing various
> Unix-like functions, which again can be found in the same
> place.
>
531,534c552,555
< <buzz@toxicavenger.bear.com>, to create a higher level interface
< (DBperl) that will allow you to write your queries in a
< database-independent fashion. Meanwhile, here are the authors of the
< various extensions:
---
> <buzz@bear.com>, to create a higher level interface (DBperl) that
> will allow you to write your queries in a database-independent
> fashion. If you're interested, send mail to
> <perldb-interest-request@vix.com> about it.
535a557,558
> Meanwhile, here are the authors of the various extensions:
>
539c562
< Interperl Interbase Buzz Moschetti (buzz@fsrg.bear.com)
---
> Interperl Interbase Buzz Moschetti (buzz@bear.com)
658c681
< archive.cs.ruu.nl [131.211.80.5] via anonymous ftp in the directory
---
> ftp.cs.ruu.nl [131.211.80.17] via anonymous ftp. in the directory
691c714
< speak to this STDIN server.
---
> speak to this STDWIN server.
816,822c839,840
< At this time, the known list includes at least the following: Convex,
< Netlabs, BSDI, Integraph, Dell, and Kubota Pacific, although the
< latter is in /usr/contrib only. Many other companies use Perl
< internally for purposes of tools development, systems administration,
< installation scripts, and test suites. Rumor has it that the large
< workstation vendors (the TLA set) are seriously looking into shipping
< Perl with their standard systems "soon".
---
> At this time, the known list of companies that ship Perl includes at
> least the following:
823a842,855
> BSDI
> Comdisco Systems
> CONVEX Computer Corporation
> Dell
> Integraph
> Kubota Pacific (/usr/contrib)
> Netlabs
>
> Many other companies use Perl internally for purposes of tools
> development, systems administration, installation scripts, and test
> suites. Rumor has it that the large workstation vendors (the TLA set)
> are seriously looking into shipping Perl with their standard systems
> "soon".
>
828a861
>
843c876
< of the earlier ones are on convex.com in /pib/perl/info/japh.
---
> of the earlier ones are on convex.com in /pub/perl/info/japh.
849a883
> 1.29) Is there a pretty-printer for Perl?
850a885,887
> That depends on what you mean. If you want something
> that works like vgrind on Perl programs, then the answer
> is "yes, nearly". Here's a vgrind entry for perl:
851a889,902
> PERL|perl|Perl:\
> :pb=(^\d?sub\d\p\d?|\{):\
> :bb={:be=}:cb=#:ce=$:sb=":se=\e":lb=':\
> :le=\e':tl:\
> :id=_:\
> :kw=\
> if for foreach unless until while continue else elsif \
> do eval require \
> die exit \
> defined delete reset \
> goto last redo next dump \
> local undef return \
> write format \
> sub package
852a904,913
> It doesn't actually do everything right; in particular,
> things like $#, $', s#/foo##, and $foo'bar all confuse it.
>
> If what you mean is whether there is a program that will
> reformat the program much as indent(1) will do for C, then
> the answer is no. The complex feedback between the scanner
> and the parser (as in the things that confuse vgrind) make
> it challenging to write at best to write a stand-alone C parser.
>
>
999c1060
< reutrns 5 times whether printing (2+4) succeeded, and
---
> returns 5 times whether printing (2+4) succeeded, and
1015c1076
< properly. Recasting your code to use them can help alot.
---
> properly. Recasting your code to use them can help a lot.
1098c1159
< while () {
---
> while (<>) {
1158c1219
< context, an that the <FILE> syntax in an array context will read all the
---
> context, and that the <FILE> syntax in an array context will read all the
1192c1253
< system "stty", 'cbreak',
---
> system "stty", '-icanon',
1676c1737
< foreach $key ( sort { $x{$b} <=> $a{$a} } keys %ary ) {
---
> foreach $key ( sort { $ary{$b} <=> $ary{$a} } keys %ary ) {
1871c1932
< associative array in an analagous fashion. That's because %foobar in
---
> associative array in an analogous fashion. That's because %foobar in
1988c2049
< you're still apt to be bogged down by exec()s. You have to analize
---
> you're still apt to be bogged down by exec()s. You have to analyze
2099c2160
< plum and pcops. Since perl5 is prety much a total rewrite, we can
---
> plum and pcops. Since perl5 is pretty much a total rewrite, we can
2101c2162
< problem before then, a signifcant portion of the perl world would
---
> problem before then, a significant portion of the Perl world would
2102a2164,2206
>
>
> 2.35) How can I set up a footer format to be used with write()?
>
> While the $^ variable contains the name of the current header format,
> there is no corresponding mechanism to automatically do the same thing
> for a footer. Not knowing how big a format is going to be until you
> evaluate it is one of the major problems.
>
> If you have a fixed-size footer, you can get footers by checking for
> line left on page ($-) before each write, and printing the footer
> yourself if necessary.
>
> Another strategy is to open a pipe to yourself, using open(KID, "|-")
> and always write()ing to the KID, who then postprocesses its STDIN to
> rearrange headers and footers however you like. Not very convenient,
> but doable.
>
>
> 2.36) Why does my Perl program keep growing in size?
>
> While there may be a real memory leak in the Perl source code or even
> whichever malloc() you're using, common causes are incomplete eval()s
> or local()s in loops.
>
> An eval() which terminates in error due to a failed parsing
> will leave a bit of memory unusable.
>
> A local() inside a loop:
>
> for (1..100) {
> local(@array);
> }
>
> will build up 100 versions of @array before the loop is done.
> The work-around is:
>
> local(@array);
> for (1..100) {
> undef @array;
> }
>
> Larry reports that this behavior is fixed for perl5.
--
Tom Christiansen tchrist@convex.com convex!tchrist
signal(i, SIG_DFL); /* crunch, crunch, crunch */
--Larry Wall in doarg.c from the perl source code